<%@page import="com.windfone.common.Constant"%>
<%@ page language="java" contentType="text/html; charset=utf-8"    pageEncoding="utf-8"%>
<%@ include file="../head.jsp" %>
<%@ taglib uri="/WEB-INF/recommend.tld" prefix="windfone" %>
<%
String user = "";
if ( request.getSession().getAttribute("userName") != null)
	user = (String)request.getSession().getAttribute("userName");
else 
	response.sendRedirect("index.action");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>風馳電訊-訂單詳細</title>
<script type="text/javascript" src="../js/jquery-1.4.2.js"></script>
<script>

function updateOrder(){
	var orderStatus = $("#orderStatus").val();  
	var companyMemo = $("#companyMemo").val();  
	$.ajax({  
	    type:"post",  
	    url:"<%=contextPath%>/updateOrder.action",  
	    data:{orderStatus:orderStatus,companyMemo:companyMemo},  
     	success: function(data){
	    	if ( data.msg == true ){
	    	 	alert("更新成功");
	    	}
		    else {
	    	 	alert("更新失败");
		     
		    }
	 	} 
	});
	 
}

</script>

<link rel="stylesheet" type="text/css" href="../css/css.css"/>
<link rel="stylesheet" type="text/css" href="../css/common.css"/>
<link  rel="Stylesheet" type="text/css" href="../css/ordershow.css"/>
<style>
#coodoo_Header a
{
	font-size:14px;
	font-weight:bold;
	font-weight:bold;
	font-size:14px;
	color:#FFFFFF;
	text-decoration:none;
}
</style>
<style>
html{color:black; background:white;}
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,blockquote,th,td{margin:0; padding:0;}
body{font-size:12px; font-family:Arial, Helvetica, sans-serif;}
img{border:0px; vertical-align:top;}
a{font-size:12px; text-decoration:none;}
a,a:link,a:visited{color:#353535;}
a:hover{color:#fc6900;}

.box3 dd.tl{float:left; width:7px; height:31px;}
.box3 dd.tb{float:left; height:31px;}
.box3 dd.tr{float:left; width:7px; height:31px;}
.box3 dd.bl{float:left; width:7px; height:7px; font-size:0px;}
.box3 dd.bb{float:left; height:7px; font-size:0px;}
.box3 dd.br{float:left; width:7px; height:7px; font-size:0px;}

.box3 .gg31tleft{background:url(../images/box1/gg31_tleft.jpg);}
.box3 .gg31tbg{background:url(../images/box1/gg31_tbg.jpg);}
.box3 .gg31tright{background:url(../images/box1/gg31_tright.jpg);}
.box3 .gg31bleft{background:url(../images/box1/gg31_bleft.jpg);}
.box3 .gg31bbg{background:url(../images/box1/gg31_bbg.jpg);}
.box3 .gg31bright{background:url(../images/box1/gg31_bright.jpg);}
.box3 .gg31bg{clear:both; border-left:solid 1px #dcdcdc; border-right:solid 1px #dcdcdc;}

.box03 dl.b03t dd.b03tl{float:left; width:6px; height:31px; background:url(../images/box03_tleft.png);}
.box03 dl.b03t dd.b03tb{float:left; height:31px; background:url(../images/box03_tbg.png);}
.box03 dl.b03t dd.b03tr{float:left; width:6px; height:31px; background:url(../images/box03_tright.png);}
.box03 div.b03b{border-left:solid 1px #dcdcdc; border-right:solid 1px #dcdcdc;}
.box03 dl.b03f dd.b03fl{float:left; width:6px; height:6px; background:url(../images/box03_fleft.png);}
.box03 dl.b03f dd.b03fb{float:left; height:6px; background:url(../images/box03_fbg.png);}
.box03 dl.b03f dd.b03fr{float:left; width:6px; height:6px; background:url(../images/box03_fright.png);}
</style>


</head>
<body style="background-color:#FFFFFF;width: 950px;margin:0 auto;">
<div>
<div class="osbox">
	<div class="odbox">
		<dl class="odh">
			<dd class="odhl"></dd>
			<dd class="odhb w781"></dd>
			<dd class="odhr"></dd>
			<dd class="floatend"></dd>
		</dl>
		<div class="odb w985_p20" style="width: 890px;">
			<div class="onum">订单号：${receiveMsg.orderSeq }</div>
			<dl class="rec_1">
				<dd class="item1"><span class="black_b">收 货 人：</span> ${receiveMsg.name }</dd>
				<dd class="item1"><span class="black_b">详细地址：</span> ${receiveMsg.detailaddress }</dd>
				<dd class="item1"><span class="black_b">联系电话：</span>${receiveMsg.telnumber } &nbsp; ${receiveMsg.mobile } </dd>
				<dd class="item1"><span class="black_b">邮政编码：</span> ${receiveMsg.zipcode }</dd>
				<dd class="item1"><span class="black_b">配送方式：</span> 
					<c:if test="${ receiveMsg.postType == '1' }"> 顺丰快递（<span class="red">运输费： 0.00元</span>）</c:if>
					<c:if test="${ receiveMsg.postType == '2' }"> EMS 快递（<span class="red">运输费： 40.00元</span>）</c:if>
				</dd>
				<dd class="item2">
					<span class="black_b">支付类型：</span> 
					在线支付（<span class="red">手续费： 0.00元</span>）
				</dd>
			</dl>
			<dl class="rec_2">
				<dd class="item1">支付方式：</dd>
				<dd class="item2">
					<c:if test="${ receiveMsg.payType == '1' }">
						<p>推荐一：云网在线支付 <font style="color: rgb(255, 0, 0);">免收手续费</font></p>
					</c:if>
					<c:if test="${ receiveMsg.payType == '2' }">
						<p>推荐二：支付宝在线支付  <font style="color: rgb(255, 0, 0);">免收手续费</font></p>
					</c:if>
				</dd>
				<dd class="item1">备注：</dd>
				<dd class="item3">${receiveMsg.userMemo }</dd>
			</dl>
			<div class="floatend"></div>
			<div class="pd15"></div>
			<table>
				<tr>
					<th colspan="7">我购买的商品信息</th>
				</tr>
				<tr>
					<td class="center"><span class="black_b">商品类别</span></td>
					<td class="center"><span class="black_b">商品名称</span></td>
					<td class="center"><span class="black_b">属性</span></td>
					<td class="center"><span class="black_b">配件</span></td>
					<td class="center"><span class="black_b">单价</span></td>
					<td class="center"><span class="black_b">数量</span></td>
					<td class="center"><span class="black_b">小计</span></td>
				</tr>
				<c:forEach var="mobile" items="${orderList}" varStatus="status">  
				<tr>
					  <td class="center">
					  	<c:if test="${mobile.goodstype == 0 }">手机</c:if>
			  			<c:if test="${mobile.goodstype == 1 }">配件</c:if>
			  			</td>
					  <td class="center">
					  ${mobile.name }
					  </td>
					  <td class="center">
					  		<c:if test="${ mobile.colorName != null }">${ mobile.colorName }</c:if>
					  </td>
					  <td class="center">${mobile.standard}</td>
					  <td class="center">
					    <span class="green_b">¥${mobile.price }</span>
					  </td>
					  <td class="center">
					    <span class="red">${ mobile.orderNumber }</span>
					  </td>
					  <td class="center">
					    <span class="green_b">¥${mobile.price * mobile.orderNumber }</span>
					  </td>
					  <c:set var="total" value="${total+ (mobile.price * mobile.orderNumber)}"/>
				</tr>
				</c:forEach>
			</table>
			<div class="o_price">
				<span class="red">商品总额：</span><span class="red_b" style="padding-right: 20px;">￥${total }</span>
				<span class="red">附加总额：</span><span class="red_b" style="padding-right: 20px;">￥0.00</span>
				<span class="red">支付费率：</span><span class="red_b" style="padding-right: 20px;">￥0.00</span>
				<span class="red">配送费率：</span><span class="red_b" style="padding-right: 20px;">￥${receiveMsg.postcost }</span>
				<span class="red">积分兑换（0分）：</span><span class="red_b">￥0.00</span>
			</div>
			<div class="o_price"><span class="red">订单总额：</span><span class="red_b" style="font-size: 28px;">￥${total}</span></div>
			<div class="pd15"></div>
	 
		</div>
		 
	</div>
	
	
</div>
 <br/>
 <hr>管理员处理</hr>
 <div id="mgr">
 	<div class="odbox">
 		<form method="post"">
			 <table width="100%">
			 	<tr>
			 		<td>备注</td>
			 		<td><textarea name="companyMemo" id="companyMemo" cols="50" rows="5">${ receiveMsg.companyMemo }</textarea></td>
			 	</tr>
			 	<tr>
			 		<td>状态</td>
			 		<td>
			 		<select name="orderStatus" id="orderStatus">
 				<option value="0" <s:if test="  receiveMsg.status==0 ">selected</s:if> >未交款</option>
 				<option value="1" <s:if test="  receiveMsg.status==1 ">selected</s:if> >已交款</option>
 				<option value="2" <s:if test="  receiveMsg.status==2 ">selected</s:if>>已发货</option>
 				<option value="3" <s:if test="  receiveMsg.status==3 ">selected</s:if>>已收到</option>
 				<option value="4" <s:if test="  receiveMsg.status==4 ">selected</s:if>>退货</option>
 				<option value="5" <s:if test="  receiveMsg.status==5 ">selected</s:if>>完成</option>
 				</select>
			 		
			 		</td>
			 	</tr>
			 	<tr>
			 		<td colspan="2">
			 		<input type="button" value="更新" name="update" onclick="updateOrder()"/>
			 		<input type="hidden" name="orderSeq" value="${receiveMsg.orderSeq }"  />
			 		</td>
			 	</tr>
			 </table>
 		</form>
			</div>
			 
 </div>
</div>
 
</body>
</html>
